#include <stdio.h>

int main() {
    int scores[10]; 
    int n;         
    int x;    
    for (int i = 0; i < 10; i++) {
        scanf("%d", &scores[i]);
    }
    
    scanf("%d", &n);
    
    for (int i = 0; i < n; i++) {
        scanf("%d", &x);
        scores[x - 1] += 10;  }
    
    for (int i = 0; i < 10; i++) {
        if (i > 0) {
            printf(" ");
        }
        printf("%d", scores[i]);
    }
    printf("\n");

    return 0;
}
